<template>
	<u-popup :show="show" class="my-popup" :closeOnClickOverlay="true" mode="right" @close="closePopup" v-bind="$attrs">
		<slot>
			<view class="p-20">
				<my-forms ref="dynamicForm" :model="$attrs.queryParams" :formItem="$attrs.formItem" />
				<view class="flex m-between">
					<button type="error" size="mini" @click="reset">重置</button>
					<button type="primary" size="mini" @click="submit">确定</button>
				</view>
			</view>
		</slot>
	</u-popup>
</template>

<script setup>
	const emits = defineEmits(['reset', 'submit', 'close']);
	const props = defineProps({
		show: {
			type: Boolean,
			default: false
		},
	});
	const closePopup = () => {
		emits('close')
	}
	const reset = () => {
		emits('reset')
	}
	const submit = () => {
		emits('submit')
	}
</script>

<style>
</style>